@extends('admin.layouts.wap')
@section('title', '小程序版本控制')

@section('content')

<link rel="stylesheet" type="text/css" href="/assets/css/miniapp-publish.css?v=2">
<meta name="csrf-token" content="{{ csrf_token() }}">
<input type="hidden" id="appid" value="{{ $minapps->appid }}">
<input type="hidden" id="status" value="{{ $minapps->status }}">
<input type="hidden" id="old_template_id" value="{{ $minappsListInfo->template_id }}">

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <div class="m-form-item">
                    <label><b>*</b>小程序名称:</label>
                    <div class="m-col-3 m-xs-12">
                        <input type="text" class="m-input" name="name" id="name" placeholder="{{ $minapps->name }}" disabled>
                    </div>
                </div>
                @if($minapps->status == 1)
                <div class="m-form-item">
                    <label for="text">请选择升级版本：</label>
                    <div class="m-col-3 m-xs-12">
                        <select class="m-select" name="template_id" id="template_id">
                            @foreach($templates as $template)
                            <option value="{{ $template->template_id }}">{{ $template->source_miniprogram }} {{ $template->user_version }}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                @endif
                <div class="m-form-item">
                    @if($minapps->status == 1)
                    <div class="m-form-btn" onclick="wxaUpgradation();" id="examine_pass">升级微信小程序</div>
                    @elseif($minapps->status == 8)
                    <div class="m-form-btn" onclick="wxaRelease();">发布微信小程序</div>
                    @endif
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/assets/admin/js/public/miniapp.setting.min.js?v=2023071001"></script>

@endsection
